![]() |
DIGITAL INFORMATION 04
OPENING QUESTION: Please write S.o.S! in hex in hex (formatting counts!) OBJECTIVE: During today's class I will be able to:
WORDS FOR TODAY: I STRONGLY URGE YOU TO START A DECK OF FLASH CARDS HERE
WORK O' THE DAY: You've been working at the local grocery store for a while and you finally have some cash in your pocket. One day you see a cool looking (but kind of beat-up), 1977 Toyota Landcruiser in the parking lot on sale for $500. You talk to the owner who encourages you to take a look at the vehicle. You sit in the driver seat, turn on the motor and look at the mileage on the dashboard. Oddly it shows that the current mileage on that vehicle is: 000560 Hmmmm... you are skeptical that the almost 50 year old vehicle has only 560 miles on it. Why is that? ═══════════════════════════ Take a look at the code.org "Odometer Widget" Have a look at the binary values. Start the widget running and notice how the digits roll over from 0 to 1 throughout. With that in mind, what is the highest possible value that can be shown in binary? What is that value in decimal? What is that value in hex? STOP the odometer Now please predict what will happen when the odometer gets to the largest value it can possible reach--- and then we add 1 to that number? Please discuss ═══════════════════════════ That is an example of one of our learning targets --- a concept known as overflow. Overflow occurs when there isn't sufficient physical space to store our data. When I was a kid, it was fairly typical for a car odometer to contain 5 digits! In fact it was a pretty big deal to have the odometer "go around" (which is to say reset from 99999 to 00000). How is that significant to our conversation of overflow? Please discuss!
When the odometer for a 1969 Mustang convert able (for example) reached 99,999 miles that was as far as it could go. If/when you drove ONE MORE MILE, the odometer dutifully added 1 more mile to the existing odometer but it couldn't actually do the math because there were only 5 digits available. Therefore the odometer was 'reset' from 99,999 miles to 00000 miles! ═══════════════════════════
═══════════════════════════ Now please take a few moments to research the term "round-off" errors in computer programming (That is an AP Learning Target By the By) The good news is there is LOTS of information on the topic. The bad news is much of that is badly written. Your job is to make it make sense and be prepared to do that in a slide or two that you may be asked to present to the class. Hint: DO NOT splash a paragraph or two of text on the screen and then read it to us (That's a VERY BIG no-no! HINT: Think math! Why do your math teachers insist (quite correctly) that giving an answer as a fraction value is more precise than giving an answer in decimal form.
|